function randomFn() {
  return Math.floor(Math.random()*20000);
}

function gen_rand(n) {
  let arr= [];
  for (let i = 0; i < n; i ++) {
    let t = randomFn();
    arr.push(t);
  }
  return arr;
}

function exec(arr, a, b) {
  let t = arr[a];
  arr[a] = arr[b];
  arr[b] = t;
}